#include <iostream>
#include <cstdio>
using namespace std;
int m,n;
int f[50][50];
int main()
{
    freopen("horse.in","r",stdin);
	freopen("horse.out","w",stdout);
	cin>>m>>n;
	f[1][1]=1;
	for(int i=2;i<=n;i++)
		for(int j=1;j<=m;j++)
		f[i][j] = f[i - 2][j - 1] + f[i - 2][j + 1] + f[i - 1][j - 2] + f[i - 1][j + 2];
	cout<<f[n][m];
	fclose(stdin);
	fclose(stdout);
	return 0;
}
